docs: add api reference section - #716
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kacper Żółkiewski <74975508+kacperzolkiewski@users.noreply.github.com>
Co-authored-by: Kacper Żółkiewski <74975508+kacperzolkiewski@users.noreply.github.com>
Co-authored-by: Kacper Żółkiewski <74975508+kacperzolkiewski@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds full API reference documentation pages for the library’s two main public components (EnrichedTextInput editor and EnrichedText renderer), replacing prior TODO placeholders.
Changes:
- Documented
EnrichedTextprops, types, remarks, and platform compatibility. - Added a comprehensive
EnrichedTextInputAPI reference including props, ref methods, and style/type definitions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/docs/api-reference/enriched-text.md | Adds EnrichedText API reference with prop documentation and related types. |
| docs/docs/api-reference/enriched-text-input.md | Adds EnrichedTextInput API reference covering props, ref methods, and styling/type details. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Krystian Sienkiewicz <146986839+hejsztynx@users.noreply.github.com>
Co-authored-by: Krystian Sienkiewicz <146986839+hejsztynx@users.noreply.github.com>
Co-authored-by: Krystian Sienkiewicz <146986839+hejsztynx@users.noreply.github.com>
Co-authored-by: Krystian Sienkiewicz <146986839+hejsztynx@users.noreply.github.com>
Co-authored-by: Krystian Sienkiewicz <146986839+hejsztynx@users.noreply.github.com>
Co-authored-by: Krystian Sienkiewicz <146986839+hejsztynx@users.noreply.github.com>
Co-authored-by: Krystian Sienkiewicz <146986839+hejsztynx@users.noreply.github.com>
…/docs-api-reference
Co-authored-by: Igor Furgała <74370735+exploIF@users.noreply.github.com>
…/docs-api-reference
|
|
||
| | Type | Default | Platforms | | ||
| | ------------------- | ------- | ------------ | | ||
| | `ContextMenuItem[]` | - | Android, iOS | |
There was a problem hiding this comment.
That's a general note, but let's remove Default column for callback, there is no option to have a default callback implemented
|
|
||
| ```ts | ||
| interface OnChangeStateEvent { | ||
| bold: { isActive: boolean; isConflicting: boolean; isBlocking: boolean }; |
There was a problem hiding this comment.
Can we make it more readable? I think it makes sense to extract { isActive: boolean; isConflicting: boolean; isBlocking: boolean } to a separate interface and reuse it whenever possible. Currently it's hard to see difference between styles
| :::tip | ||
|
|
||
| If you don't need the plain text value, omit `onChangeText` - continuous text | ||
| extraction can have performance implications. | ||
|
|
||
| ::: |
There was a problem hiding this comment.
Let's remove it. It's true for html, but impact when using raw text should be minimal, not worth mentioning it imo
| | ----------------------------------------------------------- | ------- | ----------------- | | ||
| | `(event: NativeSyntheticEvent<OnPasteImagesEvent>) => void` | - | Android, iOS, Web | | ||
|
|
||
| :::tip |
There was a problem hiding this comment.
Let's make it note instead
| - For the full list of supported tags and style conflicts, see | ||
| [HTML format and supported tags](/fundamentals/html-format-and-supported-tags). | ||
|
|
||
| ## Platform compatibility |
|
|
||
| ## Props | ||
|
|
||
| All props are optional except `children`, which is required. |
There was a problem hiding this comment.
| All props are optional except `children`, which is required. | |
| All props are optional except `children`. |
except already desires that this one is required ;)
|
|
||
| | Type | Default | Platforms | | ||
| | -------- | ------- | ------------ | | ||
| | `number` | `0` | Android, iOS | |
There was a problem hiding this comment.
Really default is 0? It sounds weird to me, isn't it undefined?
|
|
||
| - `EnrichedText` is read-only. Use [`EnrichedTextInput`](/api-reference/enriched-text-input) | ||
| when the user needs to edit content. | ||
| - Pass the HTML string as `children`, not as a `value` prop. |
There was a problem hiding this comment.
| - Pass the HTML string as `children`, not as a `value` prop. |
I think It's redundant
|
|
||
| ## Platform compatibility | ||
|
|
||
| <PlatformCompatibility android ios web /> |
There was a problem hiding this comment.
I think it's not needed
| ## Platform compatibility | |
| <PlatformCompatibility android ios web /> |
Summary
Add Api reference section to docs